package com.facebook.listener;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;

import com.facebook.android.FacebookError;
import com.imoblife.brainwavestus.share.BaseDialogListener;

/*
 * callback for the apprequests dialog which sends an app request to user's
 * friends.
 */
public class AppRequestsListener extends BaseDialogListener {
	
	private Activity mActivity;

	public AppRequestsListener(){}
	
	public AppRequestsListener(Activity activity) {
		this.mActivity = activity;
	}
	public void onComplete(Bundle values) {
		Toast toast = Toast.makeText(mActivity.getApplicationContext(),
				"App request sent", Toast.LENGTH_SHORT);
		toast.show();
	}

	
	public void onFacebookError(FacebookError error) {
		Toast.makeText(mActivity.getApplicationContext(),
				"Facebook Error: " + error.getMessage(), Toast.LENGTH_SHORT)
				.show();
	}

	
	public void onCancel() {
		Toast toast = Toast.makeText(mActivity.getApplicationContext(),
				"App request cancelled", Toast.LENGTH_SHORT);
		toast.show();
	}
}
